package com.glorysoft.xztpda.ui.showfile

import com.glorysoft.xztpda.base.BaseViewModel
import com.glorysoft.xztpda.entity.LotInfoEntity
import com.glorysoft.xztpda.model.LotRepository
import com.google.gson.JsonObject

/**
 * FileName: ShowFileViewModel
 * Author: XJH
 * Date: 2022/4/13 17:32
 * Description:
 * History:
 */
class ShowFileViewModel : BaseViewModel() {

    private val repository: LotRepository = LotRepository()
    var lotInfoEntity: LotInfoEntity? = null

    fun getShowFile(lot: String) {
        val map = JsonObject()
        map.addProperty("ACTIONTYPE", "FILELOOKUPCS")
        map.addProperty("LOTID", lot)
        launchOnlyResult({
            lotInfoEntity = repository.getShowFile(map)
            defUI.callObserve.call()
        })
    }






}